package packageofjbxq;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import bingliandshuju.SingleDataofAll;
import bingliandshuju.SingleInformationofIllnessDetail;

import com.example.animaldoctor03.AllIllness;
import com.example.animaldoctor03.R;
import com.example.animaldoctor03.ZhuanJiaZD;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class FangZiCS extends Activity {
	private Button buttonoffzcsf = null;
	private TextView textoffzcs = null;
	private String fangzhics = null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.fangzhics);
		textoffzcs= (TextView)findViewById(R.id.textoffzcs);
		buttonoffzcsf = (Button)findViewById(R.id.buttonoffzcsf);
		
		buttonoffzcsf.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				List<Object> listoffzcsf = new ArrayList <Object>();
				SingleDataofAll SDAoffzcsf = SingleDataofAll.getInstance();
				listoffzcsf = SDAoffzcsf.getListinformation();
				
				Bundle bundleoffzcsf = new Bundle();
				bundleoffzcsf.putSerializable("shuju", (Serializable) listoffzcsf);
				
				Intent intentoffzcsf = new Intent(FangZiCS.this , AllIllness.class);
				intentoffzcsf.putExtras(bundleoffzcsf);
				startActivity(intentoffzcsf);
				finish();
				
			}
		});
		
		
		
		SingleInformationofIllnessDetail SIIDoffzcs = SingleInformationofIllnessDetail.getInstance();
		fangzhics =	SIIDoffzcs.getfangziCS();
		Message msgoffzcs = new Message();
		msgoffzcs.what = 1;
		handleroffzcs.sendMessage(msgoffzcs);
		
		
	}
	public Handler handleroffzcs = new Handler(){


		public void handleMessage(Message msg) {
			// TODO Auto-generated method stub
		
			if(msg.what == 1){
				
				textoffzcs.setText("防治措施  " + '\n'+ '\n' + fangzhics);
			}
		}
		
		
	};

}